package com.example.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class User02 {
        @Value("10001")
        private String number;
        @Value("123456")
        private String password;

        public String getNumber() {
            return number;
        }

        public void setNumber(String number) {
            this.number = number;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }

        @Override
        public String toString() {
            return "User{" +
                    "number='" + number + '\'' +
                    ", password='" + password + '\'' +
                    '}';
        }
        public void show(){
            System.out.println(number + password);
        }
    }

